import { createApp } from "vue";
import App from "./App.vue";
import router from "./router"; // 确保路由文件路径正确
import store from "./store"; // 确保状态管理文件路径正确

const app = createApp(App);

// 注册路由
app.use(router);

// 注册状态管理
app.use(store);

// 挂载到DOM元素
app.mount("#app");

// 添加错误处理逻辑
app.config.errorHandler = (err, vm, info) => {
  console.error("Error:", err);
  console.error("Info:", info);
};
